#ifndef CUTIMAGE_H
#define CUTIMAGE_H

#include <QGuiApplication>
#include <QPixmap>
#include <QFileDialog>
#include <QApplication>
#include <QScreen>
#include <QWindow>
#include <QLabel>
#include <QVector>


/**
 * @brief The CutImage class
 * 将与截屏有关的功能封装在此类中
 */


class CutImage: public QObject
{
    Q_OBJECT

public:
    explicit CutImage(QObject *parent = nullptr);
    ~CutImage();

    void captureNowFullScreen();

    void captureLastFullScreen();

    //判断界面的内容是否发生变化
    double calculateImageSimilarity();

    bool compareImages(double tolerance);

    //截取鼠标所在位置的文本框
    void captureTextPosition(QVector<int> vec);

private:
    QString NowImgPath = "/home/mhc/workspace/images/now.png";
    QString LastImgPath = "/home/mhc/workspace/images/last.png";
    QPixmap *capturePixMap;
};

#endif // CUTIMAGE_H
